Bulk Masking Data
This API masks multiple plaintext values across one or more masking functions in a single request. Each masking function is identified by its unique function_id, and the API returns the masked data for every plaintext item.
Endpoint Details
| URL | /v1/masking/bulk |
| Method | POST |
| Authorization | Bearer Token |
Request Headers
| Header | Type | Description |
|---|---|---|
| Content-Type | String | Must be application/json |
Request Body
Use the following format to make a request:
JSON Request
{
"data": [
{
"function_id": "4155dc15-a0a7-4b89-9fda-983beec2b077",
"items": [
{
"plaintext": "contoh123"
}
]
},
{
"function_id": "5b41077a-97d1-4bc7-adf4-124025a1758b",
"items": [
{
"plaintext": "contoh456"
}
]
}
]
}
Parameters
| Parameter | Type | Description |
|---|---|---|
| data | Array | List of masking requests grouped by masking function |
| function_id | UUID | Unique identifier of the masking function used to perform masking |
| items | Array | List of plaintext values to be masked using the specified masking function |
| plaintext | String | Plaintext data to be masked |
Response
Here is an example response after the request has been successfully processed:
Response
{
"data": [
{
"function_id": "4155dc15-a0a7-4b89-9fda-983beec2b077",
"items": [
{
"plaintext": "contoh123",
"masked_data": "cont*****"
}
]
},
{
"function_id": "5b41077a-97d1-4bc7-adf4-124025a1758b",
"items": [
{
"plaintext": "contoh456",
"masked_data": "!!!to!!!6"
}
]
}
]
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
| data | Array | List of masking results grouped by masking function |
| function_id | UUID | Unique identifier of the masking function used |
| items | Array | List of masking results |
| plaintext | String | Original plaintext provided in the request |
| masked_data | String | Masked output generated from the corresponding plaintext |
info
- A valid Bearer Token is required to access this endpoint.
- Each
function_idmust refer to an existing masking function. - A single request can include multiple masking functions, each containing one or more plaintext values to mask.